/**
 * 
 */
package com.iss.card.model;

import java.io.Serializable;

import android.util.Log;

import com.iss.card.common.CommonValue;
import com.iss.card.webservice.BaseModel;

/**
 * @author dtdh
 *
 */
public class ProductDetailInfo extends BaseModel implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3703618029328800083L;
	
	private static final String PDKEY_STORE_ID = "storeId";
	private static final String PDKEY_PRODUCT_ID = "productID";
	private static final String PDKEY_PRODUCT_PICURL = "productPicUrl";
	private static final String PDKEY_PRODUCT_PICW = "productPicW";
	private static final String PDKEY_PRODUCT_PICH = "productPicH";
	private static final String PDKEY_PRODUCT_DELETED = "productDeleted";
	private static final String PDKEY_PRODUCT_MARKED = "productMarked";
	
	protected String mStoreID;
	protected int mProductID;
	protected String mProductPicUrl;
	protected int mProductDeleted;
	protected boolean mProductMarked;
	protected int mProductPicW;
	protected int mProductPicH;
	
	// temporary used. it should be removed after we select another method to compute product position.
	public int left = 0;
	public int right = 0;
	public int top = 0;
	public int bottom = 0;	
	/**
	 * @return the mStoreID
	 */
	public synchronized final String getStoreID() {
		return mStoreID;
	}


	/**
	 * @param storeID the mStoreID to set
	 */
	public synchronized final void setStoreID(String storeID) {
		this.mStoreID = storeID;
	}


	/**
	 * @return the mProductID
	 */
	public synchronized final int getProductID() {
		return mProductID;
	}


	/**
	 * @param productID the mProductID to set
	 */
	public synchronized final void setProductID(int productID) {
		this.mProductID = productID;
	}


	/**
	 * @return the mProductPicUrl
	 */
	public synchronized final String getProductPicUrl() {
		return mProductPicUrl;
	}


	/**
	 * @param productPicUrl the mProductPicUrl to set
	 */
	public synchronized final void setProductPicUrl(String productPicUrl) {
		this.mProductPicUrl = productPicUrl;
	}


	/**
	 * @return the mProductDeleted
	 */
	public synchronized final int getProductDeleted() {
		return mProductDeleted;
	}


	/**
	 * @param productDeleted the mProductDeleted to set
	 */
	public synchronized final void setProductDeleted(int productDeleted) {
		this.mProductDeleted = productDeleted;
	}


	/**
	 * @return the mProductMarked
	 */
	public synchronized final boolean isProductMarked() {
		return mProductMarked;
	}


	/**
	 * @param productMarked the mProductMarked to set
	 */
	public synchronized final void setProductMarked(boolean productMarked) {
		this.mProductMarked = productMarked;
	}


	/**
	 * @return the mProductPicW
	 */
	public synchronized final int getProductPicW() {
		return mProductPicW;
	}


	/**
	 * @param productPicW the mProductPicW to set
	 */
	public synchronized final void setProductPicW(int productPicW) {
		this.mProductPicW = productPicW;
	}


	/**
	 * @return the mProductPicH
	 */
	public synchronized final int getProductPicH() {
		return mProductPicH;
	}


	/**
	 * @param productPicH the mProductPicH to set
	 */
	public synchronized final void setProductPicH(int productPicH) {
		this.mProductPicH = productPicH;
	}


	/* (non-Javadoc)
	 * @see com.iss.card.webservice.BaseModel#addValues(java.lang.String, java.lang.String, com.iss.card.webservice.BaseModel)
	 */
	@Override
	public void addValues(String tempString, String valueString,
			BaseModel baseMode) {
		if (null == tempString) {
			return;
		}

		if (tempString.equals(PDKEY_PRODUCT_ID)) {
			this.mProductID = Integer.valueOf(valueString);
		} else if (tempString.equals(PDKEY_PRODUCT_PICURL)) {
			this.mProductPicUrl = valueString;
		} else if (tempString.equals(PDKEY_PRODUCT_PICW)) {
			this.mProductPicW = Integer.valueOf(valueString);
		} else if (tempString.equals(PDKEY_PRODUCT_PICH)) {
			this.mProductPicH = Integer.valueOf(valueString);
		} else if (tempString.equals(PDKEY_PRODUCT_DELETED)) {
			this.mProductDeleted = Integer.valueOf(valueString);
		} else if (tempString.equals(PDKEY_PRODUCT_MARKED)) {
			this.mProductMarked = CommonValue.EnumMarkStatus.MARK_PRODUCT.equals(valueString);
		} else if (tempString.equals(PDKEY_STORE_ID)) {
			this.mStoreID = valueString;
		}
		baseMode = this;
	}

}
